<?php

function skip($url, $pic, $message){
$html=<<<A
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>正在跳转中</title>
    <meta http-equiv="refresh" content="3; URL={$url}" /> 
    <link rel="stylesheet" href="style/remind.css" />
</head>
<body>
    <div class="notice">
        <span class="pic {$pic}"></span>
        {$message} 
        <a href="{$url}">3秒后自动跳转</a>
    </div>
    <div class="wu">無</div>
</body>
</html>
A;

echo $html;

exit();
}

function is_login($link){
    if(isset($_COOKIE['kuse']['name']) && isset($_COOKIE['kuse']['pw'])){
        $query = "select * from kuse_member where name = '{$_COOKIE['kuse']['name']}' and pw = '{$_COOKIE['kuse']['pw']}'";
        $result = execute($link, $query);
        if(mysqli_num_rows($result)==1){
            $data = mysqli_fetch_assoc($result);
            return $data['id'];
        }else{
            return false;
        }
    }else{
        return false;
    }
}
?>